<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>break和continue</title>
    <script>
      /*
        break表示打断,它只能用在switch或者循环中,遇到它,整个switch或者循环被终止
        continue表示跳过本轮循环,继续执行下一轮,只能用在循环中
      */
      for (let i = 0; i < 10; i++) {
        if (i == 5) {
          // break
          continue
        }
        console.log(i)
      }
    </script>
  </head>
  <body></body>
</html>
